#ifndef __JTVRECINTERFACE_H__
#define __JTVRECINTERFACE_H__
//Error code
#define FILE_NOT_FOUND		1
#define MODEL_NOT_FOUND		2
#define IMAGE_LOAD_ERROR	3
#define IMAGE_SIZE_ERROR	4

//Structure of rectangle
typedef struct
{
	int x;
	int y;
	int width;
	int height;
}DetectRectangle;

//Max result count define
#define MAX_RESULT_COUNT 10

//Structure of recognition result
typedef struct
{
	DetectRectangle* rects[MAX_RESULT_COUNT]; //rects of nagative recognitions
	int resultCount; //count of negative recognitions
}RecognitionResult;


//Interface
//Example:
//	Params:
//		const char** path : image pathes (in case of multiple image input)
//		RecognitionResult* results : recogition result for every image
//		int imgCount : the count of images that input
//	Return:
//		Error code
//int RecInterface(const char** path, RecognitionResult* results, int imgCount);

const char* JTVGetErrorMsg(int nErrorCode)
{
    switch (nErrorCode)
    {
    case FILE_NOT_FOUND:
        return "Cannot find image file.";
    case MODEL_NOT_FOUND:
        return "Cannot find model file.";
    case IMAGE_LOAD_ERROR:
        return "Error Loading Image.";
    case IMAGE_SIZE_ERROR:
        return "Image size error.";
    default:
        return "error";
    }
}


#endif // __JTVRECINTERFACE_H__
